#ifndef _WS_SERVER_CMD_SCH_H__
#define _WS_SERVER_CMD_SCH_H__

#include <libwebsockets.h>
#include <string.h>
#include <signal.h>
#include <pthread.h>

struct mymsg {
	char  ws_buff[1024]; /* is malloc'd */
	char  ws_receivebuff[1024];
	uint8_t type;
	size_t len;
	size_t r_len;
};

//线程接收ws数据解码
void *ws_parse_receive_cmd(void *arg);


//线程发送数据到ws
void *ws_send_cmd_data(void *arg);

/**
 *****************************************************************************************
 * @brief User dfu start.
 *****************************************************************************************
 */

void send_data_to_ws(char *buff ,uint16_t len ,uint8_t type);

void read_data_from_ws(char *buff ,uint16_t len);

#endif


